{% extends "base.html" %}

{% block content %}
<div class="container mt-4">
    <h2>编辑客户信息</h2>
    <form method="POST">
        <div class="mb-3">
            <label for="customer_name" class="form-label">客户姓名</label>
            <input type="text" class="form-control" id="customer_name" name="customer_name" 
                   value="{{ customer.customerName }}" required>
        </div>
        <div class="mb-3">
            <label for="phone" class="form-label">电话号码</label>
            <input type="tel" class="form-control" id="phone" name="phone" 
                   value="{{ customer.telephone if customer.telephone else customer.phone }}" required>
        </div>
        <div class="mb-3">
            <label for="address" class="form-label">地址</label>
            <input type="text" class="form-control" id="address" name="address" 
                   value="{{ customer.address }}" required>
        </div>
        <button type="submit" class="btn btn-primary">保存更改</button>
        <a href="{{ url_for('admin_customers') }}" class="btn btn-secondary">取消</a>
    </form>
</div>
{% endblock %}